package com.xgst.runningmanager

import com.hjq.http.EasyConfig
import com.xgst.baselib.BaseApplication
import com.xgst.lib.http.RequestHandler
import com.xgst.runningmanager.constant.RongKey
import com.xgst.runningmanager.http.RequestServer
import io.rong.imkit.RongIM
import okhttp3.OkHttpClient

class App:BaseApplication() {
    override fun init() {
        initHttp()
    }

    private fun initHttp() {
        EasyConfig.with(OkHttpClient.Builder().build())
            .setServer(RequestServer())
            .setHandler(RequestHandler())
            .setRetryCount(3)
            .into()

        /*if (!BuildConfig.DEBUG) {
            LogUtils.getConfig()
                .setLogHeadSwitch(false)
            EasyConfig.getInstance().setLogStrategy(LogStrategy())
        }*/

        RongIM.init(this, RongKey.RONG_KEY);
    }
}